/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.financial.entity.billnegotiated;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 到单押汇Entity
 * @author Kilo
 * @version 2021-03-10
 */
@Table(name="t_bill_negotiated_detail", alias="a", columns={
		@Column(name="bill_negotiated_detail_id", attrName="billNegotiatedDetailId", label="到单押汇明细ID", isPK=true),
		@Column(name="days", attrName="days", label="发生天数"),
		@Column(name="start_date", attrName="startDate", label="押汇日期起"),
		@Column(name="end_date", attrName="endDate", label="押汇日期至"),
		@Column(name="margin_ratio", attrName="marginRatio", label="保证金比例"),
		@Column(name="margin_amount", attrName="marginAmount", label="保证金金额"),
		@Column(name="negotiated_rate", attrName="negotiatedRate", label="押汇利率"),
		@Column(name="negotiated_interest", attrName="negotiatedInterest", label="押汇利息"),
		@Column(name="repayment_amount", attrName="repaymentAmount", label="应还款金额"),
		@Column(name="remark", attrName="remark", label="备注"),
		@Column(name="type", attrName="type", label="类型", comment="类型（1资方 2客户）"),
		@Column(name="bill_negotiated_id", attrName="billNegotiatedId.billNegotiatedId", label="到单押汇ID"),
		@Column(name="prepayment_id", attrName="prepaymentId", label="预付款ID"),
		@Column(name="advances_received_id", attrName="advancesReceivedId", label="预收款ID"),
	}, orderBy="a.bill_negotiated_detail_id ASC"
)
public class BillNegotiatedDetail extends DataEntity<BillNegotiatedDetail> {
	
	private static final long serialVersionUID = 1L;
	private String billNegotiatedDetailId;		// 到单押汇明细ID
	private Long days;		// 发生天数
	private Date startDate;		// 押汇日期起
	private Date endDate;		// 押汇日期至
	private String marginRatio;		// 保证金比例
	private Double marginAmount;		// 保证金金额
	private String negotiatedRate;		// 押汇利率
	private Double negotiatedInterest;		// 押汇利息
	private Double repaymentAmount;		// 应还款金额
	private String remark;		// 备注
	private String type;		// 类型（1资方 2客户）
	private BillNegotiated billNegotiatedId;		// 到单押汇ID 父类
	private String prepaymentId;
	private String advancesReceivedId;

	public String getPrepaymentId() {
		return prepaymentId;
	}

	public void setPrepaymentId(String prepaymentId) {
		this.prepaymentId = prepaymentId;
	}

	public String getAdvancesReceivedId() {
		return advancesReceivedId;
	}

	public void setAdvancesReceivedId(String advancesReceivedId) {
		this.advancesReceivedId = advancesReceivedId;
	}

	public BillNegotiatedDetail() {
		this(null);
	}


	public BillNegotiatedDetail(BillNegotiated billNegotiatedId){
		this.billNegotiatedId = billNegotiatedId;
	}
	
	public String getBillNegotiatedDetailId() {
		return billNegotiatedDetailId;
	}

	public void setBillNegotiatedDetailId(String billNegotiatedDetailId) {
		this.billNegotiatedDetailId = billNegotiatedDetailId;
	}
	
	public Long getDays() {
		return days;
	}

	public void setDays(Long days) {
		this.days = days;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Length(min=0, max=10, message="保证金比例长度不能超过 10 个字符")
	public String getMarginRatio() {
		return marginRatio;
	}

	public void setMarginRatio(String marginRatio) {
		this.marginRatio = marginRatio;
	}
	
	public Double getMarginAmount() {
		return marginAmount;
	}

	public void setMarginAmount(Double marginAmount) {
		this.marginAmount = marginAmount;
	}
	
	@Length(min=0, max=10, message="押汇利率长度不能超过 10 个字符")
	public String getNegotiatedRate() {
		return negotiatedRate;
	}

	public void setNegotiatedRate(String negotiatedRate) {
		this.negotiatedRate = negotiatedRate;
	}
	
	public Double getNegotiatedInterest() {
		return negotiatedInterest;
	}

	public void setNegotiatedInterest(Double negotiatedInterest) {
		this.negotiatedInterest = negotiatedInterest;
	}
	
	public Double getRepaymentAmount() {
		return repaymentAmount;
	}

	public void setRepaymentAmount(Double repaymentAmount) {
		this.repaymentAmount = repaymentAmount;
	}
	
	@Length(min=0, max=255, message="备注长度不能超过 255 个字符")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public BillNegotiated getBillNegotiatedId() {
		return billNegotiatedId;
	}

	public void setBillNegotiatedId(BillNegotiated billNegotiatedId) {
		this.billNegotiatedId = billNegotiatedId;
	}
	
}